package com.itheima.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.domain.ProductCategory;
import com.itheima.vo.PageBeanVo;
import com.itheima.vo.ProductCategoryVo;

import java.util.List;

/**
 * <p>
 * 产品分类 服务类
 * </p>
 *
 * @author fukeke
 * @since 2022-11-11
 */
public interface IProductCategoryService extends IService<ProductCategory> {

    //根据parentId分页查询商品分类
    PageBeanVo findByParentIdAndPage(Long parentId,Integer pageNum,Integer pageSize);

    //添加商品分类
    ProductCategory saveProductCategory(ProductCategory productCategory);

    //删除商品分类
    void deleteProductCategory(Long id);

    //查询所有一级分类及子分类
    List<ProductCategoryVo> findTreeCategory();

    //根据id获取商品分类
    ProductCategory findById(Long categoryId);

    //修改分类
    void updateCategory(ProductCategory productCategory);
}
